﻿using Microsoft.Practices.Unity.InterceptionExtension;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace iTelluro.Explorer.Infrastructure.CrossCutting.NetFramework.Logging
{
    public class LoggingHandler : ICallHandler
    {
        #region ICallHandler 成员

        public IMethodReturn Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
        {

            IMethodReturn returnValue = getNext()(input, getNext);
            if (returnValue.Exception == null)
            {
                //无异常
            }
            else
            {
                //记录日志                    
                //returnValue.Exception = null;
            }
            return returnValue;
        }

        public int Order
        {
            get;
            set;
        }

        #endregion
    }
}
